import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/ruoyi";

// 搜索商品
export function searchPrds(query) {
  return request({
    url: '/api/jd/banner/queryJDInfo',
    method: 'get',
    params: query
  })
}


// 提交商品
export function postPrdsList(data) {
  return request({
    url: '/api/jd/banner/add',
    method: 'post',
    data: data
  })
}

// 获取banner列表
export function getBannerList(query) {
  return request({
    url: '/api/jd/banner/list',
    method: 'get',
    params: query
  })
}

//更新上下架信息
export function updateBanner(data) {
  return request({
    url: '/api/jd/banner/update',
    method: 'post',
    data: data
  })
}

//删除banner
export function deleteBanner(data) {
  return request({
    url: '/api/jd/banner/delete',
    method: 'post',
    data: data,

  })
}
// 粉丝


//粉丝
export function queryFansList(query) {
  return request({
    url: '/api/jd/user/queryFansList',
    method: 'get',
    params: query
  })
}

//根据用户名称id
export function queryFansListByName(query) {
  return request({
    url: '/api/jd/user/queryForUser',
    method: 'get',
    params: query
  })
}
//用户订单查询
export function queryOrders(data) {
  return request({
    url: 'api/jd/order/query',
    method: 'post',
    data: data
  })
}

//用户订单统计查询
export function queryUserSum(data) {
  return request({
    url: 'api/jd/order/queryUserSum',
    method: 'post',
    data: data
  })
}


//红包后台审核
export function queryActive(data) {
  return request({
    url: 'api/jd/active/query',
    method: 'post',
    data: data
  })
}


//红包后台审核通过
export function activeOrderCountbyId(data) {
  return request({
    url: 'api/jd/active/verify',
    method: 'post',
    data: data
  })
}
